Skip to content

Conversation

@wind-c
Copy link

@wind-c wind-c commented Nov 12, 2025

error[E0015]: cannot call non-const fn core::f64::<impl f64>::to_radians in constants
--> src\servo\dynamixel\ax.rs:74:36
|
74 | const MAX_DEFLECTION: f64 = 150f64.to_radians(); // -150 to 150 deg (exclusive)
| ^^^^^^^^^^^^
|
= note: calls in constants are limited to constant functions, tuple structs and tuple variants

error[E0015]: cannot call non-const fn `core::f64::<impl f64>::to_radians` in constants
  --> src\servo\dynamixel\ax.rs:74:36
   |
74 | const MAX_DEFLECTION: f64 = 150f64.to_radians(); // -150 to 150 deg (exclusive)
   |                                    ^^^^^^^^^^^^
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
@pierre-rouanet
Copy link
Member

Hi @wind-c, are you using an old version of Rust? It does compile on CI without any issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants